package com.zzg;

import javax.annotation.Resource;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import com.zzg.entity.JobTask;
import com.zzg.service.impl.ElasticJobService;

@SpringBootApplication
public class Application implements CommandLineRunner  {
	@Resource
	private ElasticJobService elasticJobService;
	
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		SpringApplication.run(Application.class, args);
	}

	@Override
	public void run(String... args) throws Exception {
		// 扫描数据库定时任务
		elasticJobService.scanAddJob();
	}

}
